package com.phone.store.exception;

import com.phone.store.enums.ResultEnum;
import com.phone.store.util.ResultVOUtil;
import com.phone.store.vo.ResultVO;

/**
 * @author fangyu
 * @version v1.0.0
 * @date 2020/7/31 10:10 下午
 */
public class PhoneException extends RuntimeException {
    private ResultVO resultVO;

    public PhoneException(ResultVO resultVO) {
        this.resultVO = resultVO;
    }

    public ResultVO getResultVO() {
        return resultVO;
    }

    public PhoneException(ResultEnum resultEnum) {
        this.resultVO = ResultVOUtil.error(resultEnum.getMsg());
    }

    public PhoneException(String error) {
        super(error);
    }
}
